package cn.edu.zhku.citrusmonitor.util;

public class Message {

	private String status;
	private String msg;
	private Object data;
	
	public Message() {
		super();
	}
	public Message(String status, String msg) {
		super();
		this.status = status;
		this.msg = msg;
	}
	public Message(String status, String msg, Object data) {
		super();
		this.status = status;
		this.msg = msg;
		this.data = data;
	}
	
	public Message(Object data) {
		this.status = "1";
		this.msg = "OK";
		this.data = data;
	}
	
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public static Message ok(Object data) {
		return new Message(data);
	}
	
	public static Message ok() {
		return new Message(null);
	}
	
	public static Message errMsg(String msg) {
		return new Message("2", msg, null);
	}
}
